//
//  LDArtifactCell.m
//  Gift
//
//  Created by 李迪 on 15/11/17.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "LDArtifactCell.h"
#import "LDArtifactModel.h"

@interface LDArtifactCell ()

@property (nonatomic, retain)UILabel *label;

@end

@implementation LDArtifactCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createTabCell];
    }
    return self;
}

- (void)createTabCell{
    
    self.label = [[UILabel alloc]initWithFrame:CGRectMake(0, 10, 80, 20)];;
    [self addSubview:self.label];
    self.label.textAlignment = NSTextAlignmentCenter;
    [self.label release];
}

- (void)setModel:(LDArtifactModel *)model{
    
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    self.label.text = model.name;
}








- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
